import { Result } from 'antd'
import { FrownOutlined, LockOutlined } from '@ant-design/icons'

/** 404 | 无权限 */
export const PageEmpty = ({ type }: { type: 'notFound' | 'noPermission' }) => {
  if (type !== 'noPermission' && type !== 'notFound') {
    type = 'notFound'
  }

  if (type === 'noPermission') {
    return <Result icon={<LockOutlined />} title="该页面暂无权限" />
  }

  return <Result icon={<FrownOutlined />} title="该页面不存在" />
}
